package com.ruoyi.project.channel.channelSetting.service;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.project.channel.channelSetting.mapper.ChannelSettingMapper;
import com.ruoyi.project.channel.channelSetting.domain.ChannelSetting;
import com.ruoyi.project.channel.channelSetting.service.IChannelSettingService;
import com.ruoyi.common.utils.text.Convert;

/**
 * 码商配置 服务层实现
 * 
 * @author CAIN
 * @date 2019-09-07
 */
@Service
public class ChannelSettingServiceImpl implements IChannelSettingService 
{
	@Autowired
	private ChannelSettingMapper channelSettingMapper;

	/**
     * 查询码商配置信息
     * 
     * @param rateId 码商配置ID
     * @return 码商配置信息
     */
    @Override
	public ChannelSetting selectChannelSettingById(Long rateId)
	{
	    return channelSettingMapper.selectChannelSettingById(rateId);
	}
	
	/**
     * 查询码商配置列表
     * 
     * @param channelSetting 码商配置信息
     * @return 码商配置集合
     */
	@Override
	public List<ChannelSetting> selectChannelSettingList(ChannelSetting channelSetting)
	{
	    return channelSettingMapper.selectChannelSettingList(channelSetting);
	}
	
    /**
     * 新增码商配置
     * 
     * @param channelSetting 码商配置信息
     * @return 结果
     */
	@Override
	public int insertChannelSetting(ChannelSetting channelSetting)
	{
	    return channelSettingMapper.insertChannelSetting(channelSetting);
	}
	
	/**
     * 修改码商配置
     * 
     * @param channelSetting 码商配置信息
     * @return 结果
     */
	@Override
	public int updateChannelSetting(ChannelSetting channelSetting)
	{
	    return channelSettingMapper.updateChannelSetting(channelSetting);
	}

	/**
     * 删除码商配置对象
     * 
     * @param ids 需要删除的数据ID
     * @return 结果
     */
	@Override
	public int deleteChannelSettingByIds(String ids)
	{
		return channelSettingMapper.deleteChannelSettingByIds(Convert.toStrArray(ids));
	}
	
}
